<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Ananas Library: Исходный файл amoney.h</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Создано системой Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
      <li><a href="annotated.html"><span>Классы</span></a></li>
      <li class="current"><a href="files.html"><span>Файлы</span></a></li>
    </ul>
  </div>
<h1>amoney.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">** $Id: amoney.h,v 1.1 2007/03/31 13:12:27 app Exp $</span>
<a name="l00003"></a>00003 <span class="comment">**</span>
<a name="l00004"></a>00004 <span class="comment">** Service functions header file of </span>
<a name="l00005"></a>00005 <span class="comment">** Ananas application library</span>
<a name="l00006"></a>00006 <span class="comment">**</span>
<a name="l00007"></a>00007 <span class="comment">** Copyright (C) 2007 Andrey Paskal.</span>
<a name="l00008"></a>00008 <span class="comment">**</span>
<a name="l00009"></a>00009 <span class="comment">** This file is part of the Designer application of the Ananas </span>
<a name="l00010"></a>00010 <span class="comment">** automation accounting system.</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** This file may be distributed and/or modified under the terms of the</span>
<a name="l00013"></a>00013 <span class="comment">** GNU General Public License version 2 as published by the Free Software</span>
<a name="l00014"></a>00014 <span class="comment">** Foundation and appearing in the file LICENSE.GPL included in the</span>
<a name="l00015"></a>00015 <span class="comment">** packaging of this file.</span>
<a name="l00016"></a>00016 <span class="comment">**</span>
<a name="l00017"></a>00017 <span class="comment">** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE</span>
<a name="l00018"></a>00018 <span class="comment">** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</span>
<a name="l00019"></a>00019 <span class="comment">**</span>
<a name="l00020"></a>00020 <span class="comment">**</span>
<a name="l00021"></a>00021 <span class="comment">**********************************************************************/</span>
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef AMONEY_H_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define AMONEY_H_</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#include        "ananas.h"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include        "qstring.h"</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="keyword">class </span><a class="code" href="classDegree.html" title="содержит знания о роде (М/Ж) числовых порядков...">Degree</a>;
<a name="l00028"></a>00028 <span class="keyword">class </span><a class="code" href="classCurrency.html" title="содержит знания о роде (М/Ж) валюты. После задания...">Currency</a>;
<a name="l00029"></a>00029 
<a name="l00035"></a><a class="code" href="classAMoney.html">00035</a> <span class="keyword">class </span>ANANAS_EXPORT <a class="code" href="classAMoney.html" title="Класс для хранения денежных значений в различной...">AMoney</a>{
<a name="l00036"></a>00036         <span class="keyword">public</span>:
<a name="l00037"></a>00037                 <a class="code" href="classAMoney.html" title="Класс для хранения денежных значений в различной...">AMoney</a>();
<a name="l00038"></a>00038                 <a class="code" href="classAMoney.html" title="Класс для хранения денежных значений в различной...">AMoney</a>( <span class="keywordtype">double</span> amount, QString currency = <span class="stringliteral">"RUR"</span>);
<a name="l00039"></a>00039                 
<a name="l00040"></a>00040                 <span class="keywordtype">double</span>  getAmount();
<a name="l00041"></a>00041                 <span class="keywordtype">void</span>    setAmount( <span class="keywordtype">double</span> );
<a name="l00042"></a>00042                 <span class="keywordtype">void</span>    setAmount( <span class="keywordtype">double</span>,  QString currency);
<a name="l00043"></a>00043                 QString getCurrency();
<a name="l00044"></a>00044                 <span class="keywordtype">void</span>    setCurrency( QString );
<a name="l00045"></a>00045                 QString toString();
<a name="l00046"></a>00046                 QString toText();
<a name="l00047"></a>00047                 <span class="keywordtype">bool</span>    equal( <a class="code" href="classAMoney.html" title="Класс для хранения денежных значений в различной...">AMoney</a> &amp;sum );
<a name="l00048"></a>00048 
<a name="l00049"></a>00049         <span class="keyword">private</span>:
<a name="l00050"></a>00050                 <span class="keywordtype">double</span>          amount;
<a name="l00051"></a>00051                 <a class="code" href="classCurrency.html" title="содержит знания о роде (М/Ж) валюты. После задания...">Currency</a>*       currency;
<a name="l00052"></a>00052                 <a class="code" href="classDegree.html" title="содержит знания о роде (М/Ж) числовых порядков...">Degree</a>*         degree;
<a name="l00053"></a>00053                 
<a name="l00054"></a>00054                 QString degreeText( QString , <span class="keywordtype">int</span> );
<a name="l00055"></a>00055                 QString valueToText( Q_ULLONG );
<a name="l00056"></a>00056                 QString decimalValueToText( Q_ULLONG );
<a name="l00057"></a>00057                 QString singleToText( QString  );
<a name="l00058"></a>00058                 QString coupleToText( QString  );
<a name="l00059"></a>00059                 QString tripleToText( QString  );
<a name="l00060"></a>00060                 QString integerCurrencyName( QString );
<a name="l00061"></a>00061                 QString decimalCurrencyName( QString );
<a name="l00062"></a>00062                 QString firstUp( QString );
<a name="l00063"></a>00063                 
<a name="l00064"></a>00064 };
<a name="l00065"></a>00065 
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 
<a name="l00075"></a><a class="code" href="classDegree.html">00075</a> <span class="keyword">class </span><a class="code" href="classDegree.html" title="содержит знания о роде (М/Ж) числовых порядков...">Degree</a> {
<a name="l00076"></a>00076         <span class="keyword">public</span>:
<a name="l00077"></a>00077                 <a class="code" href="classDegree.html#e125218e1fe3685dfd1c23da46a5b8f8" title="Конструктор.">Degree</a>( <span class="keywordtype">int</span> = 0 );
<a name="l00078"></a>00078                 <span class="keywordtype">int</span> <a class="code" href="classDegree.html#afb1ad17f15e26b5e6b7ba08097095a2" title="Возвращает значение порядок. Возможные значения...">getValue</a>();
<a name="l00079"></a>00079                 <span class="keywordtype">void</span> <a class="code" href="classDegree.html#7e0d70bb38fcc24ca3547d957ad0c248" title="Задает значение порядка. Допустимые значения...">setValue</a>( <span class="keywordtype">int</span> value);
<a name="l00080"></a>00080                 <span class="keywordtype">bool</span> <a class="code" href="classDegree.html#f1bac3d19c96fb2c563f55871ff1ab7d" title="Возвращает true, если текущий порядок имеет мужской...">isMale</a>();
<a name="l00081"></a>00081                                 
<a name="l00082"></a>00082         <span class="keyword">private</span>:
<a name="l00083"></a>00083                 <span class="keywordtype">int</span> value;
<a name="l00084"></a>00084                 <span class="keywordtype">bool</span> male;
<a name="l00085"></a>00085 };
<a name="l00086"></a>00086 
<a name="l00095"></a><a class="code" href="classCurrency.html">00095</a> <span class="keyword">class </span><a class="code" href="classCurrency.html" title="содержит знания о роде (М/Ж) валюты. После задания...">Currency</a> {
<a name="l00096"></a>00096         <span class="keyword">public</span>:
<a name="l00097"></a>00097                 <a class="code" href="classCurrency.html#8e7f99b5d139a31f5d20195dd09ef0eb" title="Конструктор.">Currency</a>( QString currensyId = <span class="stringliteral">"RUR"</span>);
<a name="l00098"></a>00098                 
<a name="l00099"></a>00099                 QString <a class="code" href="classCurrency.html#3bd2e69a141d944c3be335f8ebde0df1" title="Возвращает символьное обозначение, идентификатор...">getId</a>();
<a name="l00100"></a>00100                 <span class="keywordtype">void</span>    <a class="code" href="classCurrency.html#e2fb146ad786db250cd1fc77015650e9" title="Установка типа валюты. Допустимые значения смотри...">setId</a>( QString );
<a name="l00101"></a>00101                 <span class="keywordtype">bool</span>    <a class="code" href="classCurrency.html#3ad9bcb3ac6a458e1696bb32a4662b71" title="Возвращает истину, если текущая валюта имеет...">isMale</a>();
<a name="l00102"></a>00102                 <span class="keywordtype">bool</span>    <a class="code" href="classCurrency.html#84c779bb6bfdd64dc0281d90f08871d3" title="Возвращает истину, если текущая валюта равна...">is</a>( QString );
<a name="l00103"></a>00103                                 
<a name="l00104"></a>00104         <span class="keyword">private</span>:
<a name="l00105"></a>00105                 QString id;
<a name="l00106"></a>00106                 <span class="keywordtype">bool</span>    male;
<a name="l00107"></a>00107 };
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 <span class="preprocessor">#endif </span><span class="comment">/*AMONEY_H_*/</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Документация по Ananas Library. Последние изменения: Sun Feb 1 21:47:14 2009. Создано системой&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
